public class Demo03 {
	public static void main(String[]args) {
		int [] arr = {20,50,63,95};
		int [] adc = six(arr);
		for (int i = 0; i < adc.length; i++) {
			System.out.println(adc[i]);
		}
	}
	public static int[] six(int[]s) {
		int [] rain = new int[2];
		int max=s[0];
		int min=s[0];
		for (int i = 0; i < rain.length; i++) {
			if(max<s[i]) {
				max=s[i];
			}
			if(min>s[i]) {
				s[i]=min;
			}
		}
		rain[0]=max;
		rain[1]=min;
		return rain;
	}
}
